package com.ideyatech.errorhandling.service;

import java.util.List;

import com.ideyatech.errorhandling.dao.IssueDao;
import com.ideyatech.errorhandling.entity.Issue;

public class IssueServiceImpl implements IssueService {
	
	private IssueDao issueDao;
	
	@Override
	public List<Issue> findAllIssues() {
		return getIssueDao().findAll();
	}

	@Override
	public Issue findIssue(Long id) {
		return issueDao.load(id);
	}

	@Override
	public void addIssue(Issue issue) {
		issueDao.saveEntity(issue);
	}

	public void setIssueDao(IssueDao issueDao) {
		this.issueDao = issueDao;
	}

	public IssueDao getIssueDao() {
		return issueDao;
	}

}
